from django import forms

from . import models

class EditKeyForm(forms.Form):
    key = forms.CharField()

    def save(self):
        data = self.clean_data
        models.ApiKey(name=data['key']).save()
